# 4、实现单例模式（和上课保持一致即可）
# 单例模式，用同一个地址，分配空间。。。

class Test(object):
    instance =None

    def __new__(cls, *args, **kwargs):
        if Test.instance is None:
            Test.instance = super().__new__(cls)

        return Test.instance

    def __init__(self,name):
        self.name = name


if __name__ == '__main__':
    music =Test('qilixiang')
    music2 = Test('dongfengpo')
    print(music.name)
    print(music.instance)
    print(music2.name)
    print(music2.instance)

